﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace W2R.Core.Models.Entities
{
    /// <summary>
    /// Represents a book instance on this system
    /// </summary>
    public class Book : BaseEntity<Guid>
    {
        #region Constructor

        public Book()
        {
        }

        public Book(string name, string coverId, string fileId, IList<Tag> tags)
            : base()
        {
            this.Name = name;
            this.CoverId = coverId;
            this.FileId = fileId;
            this.Tags = tags;
        }

        #endregion

        #region Properties

        /// <summary>
        /// Name of this book
        /// </summary>
        [Required()]
        public string Name { get; set; }

        /// <summary>
        /// url to the cover of this book
        /// </summary>
        [Required()]
        public string CoverId { get; set; }

        /// <summary>
        /// url to the file of this book
        /// </summary>
        [Required()]
        public string FileId { get; set; }

        /// <summary>
        /// list of tags to search for it
        /// </summary>
        public IList<Tag> Tags { get; set; }

        #endregion

    }
}
